package com.zbl.zblproject.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zbl.zblproject.erp.entity.ErpTempOrderItem;

import java.util.List;

/**
 * @author youlanqiang
 * @version 1.0
 * @date 2018/10/10
 * 客户订单实体类
 */
@TableName("zbl_orders")
public class Order {

    @TableId(type = IdType.AUTO)
    private int id;

    /**
     * 执行人ID
     */
    private int operatorId;

    /**
     * 订单号
     */
    private String orderSn;

    private int userId;

    private int isPay;

    private String addressId;

    private double totalMoney;

    private int isDeliver;

    private int isSign;

    private String logistics;

    private double receipt;

    private double refund;

    private int warehouseConfirm;

    private int financialConfirm;

    private long createTime;

    private String context;

    private int isConfirm;

    /**
     * 订单的状态
     */
    private int status;

    @TableField(exist = false)
    private String supplierName;

    public int getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(int supplierId) {
        this.supplierId = supplierId;
    }

    @TableField(exist = false)
    private int supplierId;//供应商主键

    @TableField(exist = false)
    private AdminUser user;

    @TableField(exist = false)
    private List<ErpTempOrderItem> items;

    @TableField(exist = false)
    private List<CartItem> cartItems;

    /**
     * 默认地址值
     */
    @TableField(exist = false)
    private String addressValue;

    /**
     * 采购订单号
     */
    private String poSn;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getOrderSn() {
        return orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getIsPay() {
        return isPay;
    }

    public void setIsPay(int isPay) {
        this.isPay = isPay;
    }

    public String getAddressId() {
        return addressId;
    }

    public void setAddressId(String addressId) {
        this.addressId = addressId;
    }

    public double getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(double totalMoney) {
        this.totalMoney = totalMoney;
    }

    public int getIsDeliver() {
        return isDeliver;
    }

    public void setIsDeliver(int isDeliver) {
        this.isDeliver = isDeliver;
    }

    public int getIsSign() {
        return isSign;
    }

    public void setIsSign(int isSign) {
        this.isSign = isSign;
    }

    public String getLogistics() {
        return logistics;
    }

    public void setLogistics(String logistics) {
        this.logistics = logistics;
    }

    public double getReceipt() {
        return receipt;
    }

    public void setReceipt(double receipt) {
        this.receipt = receipt;
    }

    public double getRefund() {
        return refund;
    }

    public void setRefund(double refund) {
        this.refund = refund;
    }

    public int getWarehouseConfirm() {
        return warehouseConfirm;
    }

    public void setWarehouseConfirm(int warehouseConfirm) {
        this.warehouseConfirm = warehouseConfirm;
    }

    public int getFinancialConfirm() {
        return financialConfirm;
    }

    public void setFinancialConfirm(int financialConfirm) {
        this.financialConfirm = financialConfirm;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }


    public List<ErpTempOrderItem> getItems() {
        return items;
    }

    public void setItems(List<ErpTempOrderItem> items) {
        this.items = items;
    }

    public AdminUser getUser() {
        return user;
    }

    public void setUser(AdminUser user) {
        this.user = user;
    }


    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public int getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(int operatorId) {
        this.operatorId = operatorId;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getPoSn() {
        return poSn;
    }

    public void setPoSn(String poSn) {
        this.poSn = poSn;
    }

    public int getIsConfirm() {
        return isConfirm;
    }

    public void setIsConfirm(int isConfirm) {
        this.isConfirm = isConfirm;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }



    public List<CartItem> getCartItems() {
        return cartItems;
    }

    public void setCartItems(List<CartItem> cartItems) {
        this.cartItems = cartItems;
    }


    public String getAddressValue() {
        return addressValue;
    }

    public void setAddressValue(String addressValue) {
        this.addressValue = addressValue;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", orderSn='" + orderSn + '\'' +
                ", userId=" + userId +
                ", isPay=" + isPay +
                ", addressId='" + addressId + '\'' +
                ", totalMoney=" + totalMoney +
                ", isDeliver=" + isDeliver +
                ", isSign=" + isSign +
                ", logistics='" + logistics + '\'' +
                ", receipt=" + receipt +
                ", refund=" + refund +
                ", warehouseConfirm=" + warehouseConfirm +
                ", financialConfirm=" + financialConfirm +
                ", createTime=" + createTime +
                '}';
    }

}
